package com.lcy.springtest.bean;


import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.stereotype.Component;

/**
 * @author lichenyang
 * @create 2021-04-19 10:50 上午
 */
//@Component
//public class MyBeanPostProcessor implements BeanPostProcessor {
//
//    /**
//     * @param bean:     容器中的实例
//     * @param beanName: 容器中实例的名称
//     * @return
//     * @throws BeansException
//     */
//    @Override
//    public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
//        System.out.println("调用 postProcessAfterInitialization bean初始化之后调用" + "名称:" + beanName + "," + bean);
//        return bean;
//    }
//
//    @Override
//    public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
//        System.out.println("调用 postProcessBeforeInitialization bean初始化之前调用" + "名称:" + beanName + "," + bean);
//        return bean;
//    }
//}
